VXFORM4 Buyer Details Form1- Label1 Tms Rmn BuyCode Label2 Aircraft Type Tms Rmn BuyType BuyTypeHelp Tms Rmn BuyTypeDesc Label3 Low Price Tms Rmn BuyLow Label4 High Price Tms Rmn BuyHigh BuySave &Save BuyCancel &Cancel BuyAdd BuyDelete &Delete BuyNext &Next BuyPrevious &Previous BuyBrowse &Browse BuyExit E&xit Label5 Status Tms Rmn BuyStatus Form_Click Form_Load AirbuyerDbf1 vxUseDbf\ FALSE Airbuy1Ntx vxUseNtx Airbuy2Ntx vxTableDeclare VX_GRAY vxTableField VX_FIELD Form_Unload@ Cancel; vxClose] StatesOpenC vxSelectDbf{ AircustDbf CustReturn BROWSE_USER vxTableReset AirstateDbf0 VXFORM1 Buyer' VXFORM3& vxSeekH CustKey vxSelectNtx Aircust1Ntx BROWSE_CLOSED BuyerReturn[ VXFORM4 BROWSE_ADD CustDataClear4 CustStatus textt CustSaveP Enabled CustCancel CustAdd CustDelete BuyRecs Aircraft BROWSE_EDIT CustDataLoadl vxTrueO vxRecNo_ BuyerDataClear+ Buytatus BuySave) BuyCancel BuyAdd BuyDelete8 BuyerDataLoad BuyStatusD CustCodez CustNamen CustCompany CustAddress CustCity CustState CustZip CustPhRes CustPhBus CustFax CustBuyer Value CustSeller CustCdatel CustRdate CustDays BuyCode BuyType BuyTypeDesc BuyLow$ BuyHighN EnableBuyerDataa b_low% b_high vxFieldB vxDouble DisableBuyerData BuyAdd_ClickC EnableCustData BuyReturn BuyBrowse_Click VXFORM2 Visible TypeReturn BrowseTypes BrowseBuyersv BuyCancel_Clickw TypeDataClear TypeStatush TypeSave TypeCancel6 TypeAdd TypeDelete BuyDelete_Click vxDeleteRecQ BuyExit_Click BuyHigh_Change KeyAscii BuyHigh_KeyPress BuyLow_Change BuyLow_KeyPress BuyType_Changef BuyType_GotFocus BROWSE_DELETE\ CodeSizeL vxFieldSize{ hwndC GetFocus SendMessage EM_LIMITTEXT BuyType_KeyPressP BuyType_LostFocus EmptyString AirtypesDbfW BuyerRec BuyTypeDesc_Change BuyNext_Click5 vxEof vxSkip TypeNext TypePrev TypeBrowse vxDeletedl vxBottom0 TypeDataLoad BuyNext BuyPrevious BuyBrowse@ EndFile BuyHigh_GotFocus BuyLow_GotFocus BuyPrevious_Click vxBof vxTop BegFiler BuySave_Click SeekKey TypeCode vxAppendBlank vxReplString TypeDescb vxWrite TypeKey vxReplDouble BuyTypeHelp_Click SaveReturn Airstat2Ntx StateReturn vxBrowse AirtypesNtxk BuyCode_Change CursorWait CursorArrow b_test vxDbl5 field^ Form_PaintD vxFormFrameR vxCtlStyle VX_RAISE VX_RECESS CurrHwnd SetFocusAPI TypeDelete_Click vxCtlLength vxUnlock Form4Active Form_Load Record addition request" if user pressed ENTER then file is positioned at current record and the record number isn returned in BuyerReturn. In this case we assume he wants to edit that record. call general proc to load controls- Edit record Form_Unload BuyerDataClear BuyerDataLoad b_low" b_high #######0 #######0 b_cat" b_desc b_code EnableBuyerData DisableBuyerData BuyAdd_Click clear form for addition of new record Record Addition Request" ensure data entry enabled reset the buttons BuyBrowse_Click ensure we're positioned to top rec of group so we don't close files when we unload the form No buyer records on file!" BuyCancel_Click Clear form data and reset button status Operation cancelled" BuyDelete_Click get user confirmation of delete Confirm Delete Deleted Delete failed" Delete cancelled BuyExit_Click BuyHigh_KeyPress {Tab}" BuyLow_KeyPress {Tab}" BuyType_GotFocus b_cat"# BuyType_KeyPress convert to uppercasec {Tab}" BuyType_LostFocus catname" BuyNext_Click skip forward one record if skip error, only allow exit- Error on Skip Next. Try Reindex. if this rec doesn't belong to this customer, eof is truei b_code b_code No buyer records on file!" test for end of file End of File! Skipped to record BuyHigh_GotFocus b_high# BuyLow_GotFocus b_low"# BuyPrevious_Click skip back one record if skip error, only allow exit Error on Skip Previous. Try Reindex. b_code No buyer records on file!" test for beginning of filer Beginning of File! Skipped to record BuySave_Click verify something in the field Field cannot be empty" verify unique key if adding Duplicate Key on Add Data passed. Put it away b_code b_cat" b_desc b_low" b_high Update status box Record " appended" Record " saved Update Button Status BuyTypeHelp_Click Aircraft Type Help j% = vxSelectDbf(AirtypesDbf) ' re-register database category catname" Form_Paint if delete request from browse, do it now- because we must let enhanced controls paint before asking for delete confirmation